import request from '../utils/request';
import { createTheURL } from '../utils/utils';
import API from '../config/api';

// Service的示例写法
export async function addNewOrder(params) {
  return request(createTheURL(API.originalOrderAPI, 'add'), {
    method: 'GET',
    body: params,
  });
}
export async function addToCar(params) {
  return request(createTheURL(API.originalOrderAPI, 'addToCar'), {
    method: 'GET',
    body: params,
  });
}
export async function cancelOrder(params) {
  return request(createTheURL(API.originalOrderAPI, 'cancel'), {
    method: 'GET',
    body: params,
  });
}
export async function customerOrderSearch(params) {
  return request(createTheURL(API.originalOrderAPI, 'customerOrder'), {
    method: 'GET',
    body: params,
  });
}
export async function getOrderById(params) {
  return request(createTheURL(API.originalOrderAPI, 'getOrder'), {
    method: 'GET',
    body: params,
  });
}